    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.js"></script>
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="index.php" style="margin-top: 5px;">Health Tracker</a>
          <div class="nav-collapse collapse">
          <div class="pull-right">
          <ul class="nav">
		  	<?php if (isset($_SESSION['session'])) {  
            ?>
            
                <li><a href="profile.php">Profile</a></li>
				
				<?php if($user->getRole() === 'doctor' || $user->getRole() === 'patient') { ?>
					<li><a href="hospitals.php">Hospitals</a> </li>
					<li><a href="doctors.php">Doctors</a></li>
					<li><a href="calendar.php">Calendar</a></li>
					<li><a href="notifications.php">Notifications</a> </li>
				<?php } ?>

                <?php
                if($user->getRole() === 'doctor'){
                    echo '<li><a href="patients.php">Patients</a> </li>';
                } else if ($user->getRole() === 'patient'){
					echo '<li><a href="symptom.php">Symptom</a></li>';
					echo '<li><a href="food.php">Food</a></li>';
					echo '<li><a href="log.php">Data Log</a></li>';
				    echo '<li><a href="request.php">Connections</a></li>';
                } else if ($user->getRole() === 'admin'){
					echo '<li><a href="admin.php">Admin</a></li>';
				}
                ?>
				<li><a href="edit.php">Settings</a></li>
            </ul>
				<form action="function/logout_function.php" method="POST" style="display: inline;">
				<input type="submit" name="logout" class="btn btn-primary" value="Logout" />
				</form>
				<?php } else { ?>
					<form action="function/login_function.php" method="POST" style="display:inline">
                    <input type="text" class="input-small" placeholder="Username" id="username" name="username" style="margin-top:8px;"/>
                    <input type="password" class="input-small" placeholder="Password" id="password" name="password" style="margin-top:8px;"/>
                    <button type="submit" name="login" class="btn btn-primary">Login</button>
					</form>
                    				<?php 
            				$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
            				if(stripos($ua,'android') !== false) { // && stripos($ua,'mobile') !== false) {
            					echo "<br/>";
            				}
				?>
                    <a href="reset.php">Forgot Password?</a>
				<?php }  ?>


              </div>
              
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>
    <script type="text/javascript">
    $(document).ready(function() {
    var con = 'connection';
    var set = 'setting';
    $('li').each(function(index) {
    var url = window.location.href;
    var doc = url.split('/');
    var url = doc[doc.length-1].slice(0,-4);
    //alert(index + ': ' + $(this).text() + ' AND URL '+url);
    //alert(index + ': ' + $(this).text());
    if($(this).text().toLowerCase().indexOf(url) != -1){
        //alert(index + ': ' + $(this).text());
        $(this).addClass("active");
    } else if($(this).text().toLowerCase().indexOf(con) != -1){
        if(url.toLowerCase().indexOf('request') != -1){
        $(this).addClass("active");
        }
    } else if($(this).text().toLowerCase().indexOf(set) != -1){
        if(url.toLowerCase().indexOf('edit') != -1){
        $(this).addClass("active");
        }
    }
    });
    });
    </script>